package day240527.work;

import day240527.work.CustomObj;

import java.util.HashSet;
import java.util.Set;

public class SetDuplicateRestriction {
    public static void main(String[] args) {
        Set<CustomObj>s1=new HashSet<>();
        s1.add(new CustomObj("n1",19));
        s1.add(new CustomObj("n2",20));
        s1.add(new CustomObj("n3",21));
        s1.add(new CustomObj("n4",22));
        s1.add(new CustomObj("n5",23));
        s1.add(new CustomObj("n1",19));
        System.out.println(s1);
    }
}
